#include <fstream>
#include <sstream>
#include <iostream>
#include <cmath>
#include <algorithm>
#include <cassert>
using namespace std;
#define PI (acos(0.0)*2.0)
#define forn(i,n) for(int i=0;i<int(n);++i)
typedef pair<double,double> pdouble;

class test {
public:
	test(string s) {
		istringstream in(s);
		in >> n >> m >> l >> a >> re >> offR >> offA;
		in >> ti >> to >> h >> k;
		assert(n>1);
		assert(m>1);
		assert(l>=3);
		assert(offR>=0.0);
		assert(a>offR);
		assert(re>=a+offR);
		assert(0<=offA && offA<2.0*PI);
		assert(0<to && to<=ti);
		assert(h>0);
		assert(k>0);
	}
	friend void writeTest(ostream& o, const test& t);
private:
	int n,m,l; double a,re,offR,offA,ti,to,h,k;
	
};

double atan2f(double y, double x) {
	double r=atan2(y,x);
	if (r<0) r+=2*PI;
	return r;	
}

pdouble pol(pdouble v) {
	return pdouble(sqrt(v.first*v.first+v.second*v.second),
		atan2(v.second,v.first));
}
pdouble rect(pdouble v) {
	return pdouble(v.first*sin(v.second),v.first*cos(v.second));
}
pdouble addRect(pdouble v, pdouble w) { 
	return pdouble(v.first+w.first,v.second+w.second);
}

void writeTest(ostream& out, const test& t) {
	out << t.n << " " << t.m << " ";
	out << t.ti << " " << t.to << " " << t.h << " " << t.k << " ";
	
	pdouble omega(t.offR,t.offA);
	double delta=t.re/t.m;
	double tita=0.0;
	double beta=(2.0*PI)/t.l;
	double alpha=(PI-beta)/2.0;
	double gamma=(2.0*PI)/t.n;
	double fi=0.0;
	for(int k=t.n;k--;tita+=gamma,fi+=gamma) {
		while (tita >= beta) tita-=beta;
		pdouble ri((t.a*sin(alpha))/sin(PI-alpha-tita),fi);
		pdouble r=pol(addRect(rect(ri),rect(omega)));
		int rm=int(r.first/delta+0.5);
		out << " " << rm;
	} 
	out << endl;
}

void proc(string ln, ostream& o) {
	writeTest(o,test(ln));
}

bool isWhite(char c) { return c==' ' || c=='\n' || c=='\t'; }
int main(int argc, char** argv) {
	if(argc < 3) {
		cerr << argv[0] << " entrada salida\n";
		return 1;
	}
	ifstream in(argv[1]);
	string ln;
	ofstream out(argv[2]);
	while(getline(in,ln)) {
		bool com=true;
		forn(i,ln.size()) if (!isWhite(ln[i])) 
			{ com=(ln[i]=='#');  break; }
		if (!com) proc(ln,out);
	}
	return 0;
}
